package pkg1;

import java.io.IOException;
import java.util.Map;

import javax.servlet.Servlet;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.annotation.WebServlet;

import com.alibaba.fastjson.JSON;
import com.google.common.collect.Maps;

@WebServlet(name = "servletName", urlPatterns = "/list_json")
public class servlet1 implements Servlet{

	@Override
	public void destroy() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public ServletConfig getServletConfig() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String getServletInfo() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void init(ServletConfig arg0) throws ServletException {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void service(ServletRequest arg0, ServletResponse response) throws ServletException, IOException {
		Map  m=Maps.newConcurrentMap();
		m.put("loginname", "attilax222233");
		response.getWriter().println  (   JSON.toJSONString(m)); // �벻Ҫ�޸Ļ�ɾ��
		
	}

}
